package com.zc.study.spring.第一章.practise;

import com.zc.study.spring.第一章.spring1_2_4.run;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;


public class Run {
    private static final Logger logger= LoggerFactory.getLogger(run.class);
    private Service ss;
    public Run() {
        Resource resource =new ClassPathResource("study_spring/spring1_practise/filecontext.xml");
        BeanFactory beanFactory = new XmlBeanFactory(resource);
        ss = (Service) beanFactory.getBean("fileHelloWorld");
    }

    public String getConteng() {
        return ss.getContent();
    }

    public static void main(String[] args) {
        logger.debug(new Run().getConteng());
    }
}
